﻿<?php
/**
* @version		$Id: view.html.php 9764 2007-12-30 07:48:11Z ircmaxell $
* @package		Joomla
* @subpackage	Poll
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport( 'joomla.application.component.view');
class amapViewpointageldb_sans_detail extends JView	{
	function display($tpl = null)	{
		$liste=listeLivraisonsldb();
		//print_r($liste);
		//construction formulaire


  $mainframe =& JFactory::getApplication();
$ida=$mainframe->getUserState('amap_ida');

// pour que la page  ne s'affiche pas en lien direct non connecté
if ($ida==0) return;


		echo "<H3>Liste de pointage générale pour la table de pointage.</h3>";
		echo "<strong>Cliquez sur <img src='".JURI::root()."components/com_amap/images/icone-html.png' width='48' style='padding: 5px;'> de la ligne correspondant à la date à imprimer.</srong><br>";
		
		echo "<CENTER><TABLE width='95%'>
				<TR style='background-color: #0096D2; color: white;'>
					<TD width='40%' align='center'><strong>Date</strong></TD>
					<TD align='center' colspan='3'><strong>Type de fichier</strong></TD>
				</TR>";
		foreach ($liste as $element)	{
			echo 	"<TR class='amap_beautableau'>
						<TD align='center'><strong style='font-size: 1.2em;'>". fdate($element['Date'])."</strong></TD>
						<TD align='center'>
							<A href='".JURI::root()."index.php/component/amap/?view=liste_pointageldb_sans_detail&extension=tableur&Date=".$element['Date']."'><img src='".JURI::root()."components/com_amap/images/icone-xls.png' width='48' style='padding: 5px;'></A>
						</TD>
						<TD align='center'>
							<A href='".JURI::root()."index.php/component/amap/?view=liste_pointageldb_sans_detail&extension=pdf&Date=".$element['Date']."'><img src='".JURI::root()."components/com_amap/images/icone-pdf.png' width='48' style='padding: 5px;'></A>
						</TD>
						<TD align='center'>
							<A href='".JURI::root()."index.php/component/amap/?view=liste_pointageldb_sans_detail&extension=html&Date=".$element['Date']."'><img src='".JURI::root()."components/com_amap/images/icone-html.png' width='48' style='padding: 5px;'></A>
						</TD>
					</TR>";
		}
		
		echo "
			</TR>
			</TABLE></CENTER>";

		parent::display($tpl);
	}
}


?>
